<?php
$friend_id = get_input('friend_id');
$app = 'opinions';
$pending = TRUE;

$friend_entities = greengar_get_friends($friend_id, $app, FALSE);

$return = array();

foreach($friend_entities as $friend_entity) {
    $ratingArray['user'] = userToArray($friend_entity, $app, FALSE);
    $return[] = $ratingArray;
}

echo json_encode(export_result(200, $return));
?>